package com.yanqu.road.server.cmd.activity.chuhan;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.ChuHanProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.chuhan.CrossChuHanMgr;
import com.yanqu.road.server.manager.activity.chuhan.activity.CrossChuHanActivity;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C2_CHUHAN_GET_BATTLE_FIELD, desc = "")
public class CrossChuHanGetBattleFieldCmd extends CrossUnionCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        ChuHanProto.CrossChuHanGetBattlefieldReqMsg reqMsg = ChuHanProto.CrossChuHanGetBattlefieldReqMsg.parseFrom(packet.getBytes());
        CrossChuHanActivity activity = CrossChuHanMgr.getActivity(reqMsg.getActivityId(),groupId);
        activity.setLastReqTime(packet.getPlayerId());
        activity.getBattleFieldByCmd(packet.getPlayerId(), reqMsg.getReq());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

    }

    @Override
    public void sendData() {

    }
}
